Release 10.1A: OpenEdge Development:
.NET Open Clients


Passing TABLE and TABLE-HANDLE parameters

This section describes mapping 4GL temp-tables to ADO.NET DataTables, using the TABLE and TABLE-HANDLE parameters.

Progress 4GL procedures can pass TABLE or TABLE-HANDLE parameters to an AppServer. This is a convenient and efficient way to pass relational data between the client and the AppServer code. The .NET Open Client environment provides the same capability using an ADO.NET DataTable. A .NET Open Client passes a 4GL TABLE parameter using an ADO.NET strongly typed DataTable object that is generated by ProxyGen and mapped to the specified temp-table. This strongly typed DataTable object inherits from Progress.Open4GL.ProDataTable, which in turn inherits from the standard ADO .NET class, System.Data.DataTable.

TABLE–HANDLE parameters allow the transfer of dynamic temp-tables between Open Clients and the AppServer, without requiring a complete, static definition of the table on each side of the transfer (as with TABLE parameters). A .NET Open Client passes a 4GL TABLE-HANDLE parameter using an ADO.NET DataTable object, System.Data.DataTable.

For each unique static temp-table (TABLE parameter), ProxyGen generates a strongly typed DataTable class, TypedDataTable.cs. TypedDataTable is the name of the static temp-table in the 4GL procedure, appended with DataTable. For example, in a procedure with a static temp-table CustTT, TypedDataTable is CustTTDataTable. If other temp-table parameters in other methods in the proxy share the same schema, ProxyGen does not create additional strongly typed DataTable classes but uses the same strongly typed DataTable class for these methods. The name of the temp-table parameter does not matter when comparing the schema of temp-table parameters. However, field names, types, and indexes do need to match. (This differs from the Progress 4GL in which field names and indexes do not need to match.)

Also, if ProxyGen detects two or more temp-table parameters with the same name but different schemas, ProxyGen creates multiple strongly typed DataTable classes, one for each unique schema. ProxyGen appends a unique number to the end of the temp-table name, to create unique class names. For example, if multiple procedures define a static temp-table CustTT, each with a different schema, TypedDataTable can be CustTTDataTable, CustTT2DataTable, and so on.

All strongly typed DataTable classes are defined in the following namespace:

[namespace.]StrongTypesNS 

Where namespace is the namespace you optionally entered on the .NET tab of the Generate dialog box in ProxyGen. (See the "Namespace for proxy objects" section.)

This section covers the following topics:


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095